package org.lmind.mis.webapp.action;

import javax.persistence.EntityManager;

import org.lmind.mis.privilege.IPrivilegeService;
import org.lmind.mis.webapp.service.IUserRepository;

import com.opensymphony.xwork2.ActionSupport;

public abstract class BaseAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private IPrivilegeService privilegeService;
	
	private EntityManager entityManager;

	public IPrivilegeService getPrivilegeService() {
		return privilegeService;
	}

	public void setPrivilegeService(IPrivilegeService privilegeService) {
		this.privilegeService = privilegeService;
		System.out.println("!!!!!!!!!!!!!!privilegeService!!!!!!!!!!!!!");
	}

	public EntityManager getEntityManager() {
		return entityManager;
	}

	public void setEntityManager(EntityManager entityManager) {
		this.entityManager = entityManager;
	}

	@Override
	public final String execute() throws Exception {
		return executeAction();
	}

	abstract protected String executeAction() throws Exception ;
}
